order

Usage: order x0col ... xncol ycol σycol σx0col ... σxncol

order assigns significance to the columns in the internal data matrix. When a data file is read with the gd command, the first column in the file is stored in the data[0]. (The 0th column of an 2-D array). The second column is stored in data[1], etc. By default, these columns are interpteted in a certain way (See the gd command). The order command is used to change the default behavior.

Errors in the independent variables can be used in the fit by using techniques of error propagation to calclate a corresponding error in y. That is:

σy = $\displaystyle \sqrt{{ \sigma_y^2 + \sigma_x^2 \frac{dy}{dx}^2 }}$.

Each data point has its own value of σx and σy. Each σx must be in a column in the data file. The weighting for σy should be statistical, instrumental or other if σx is considered in the fit. You should not select no weighting if you want to use σx. If the order command selects a column to be σx, then this information is used for the fit. If you wish to not use this information, assign σxcol to be -1 (the default value). If the fitting algorithm has a problem converging when using σx, try the fit without using σx. Then take those parameters as the initial parameters for the fit considering σx. Note that errors in the independent variables are not considered during linear least squares fitting.

Examples for one independent variable:

order 2 1 0 x0 is the third column in the file, y is the second column, σy is the first column.

order 1 4 x0 is the second column, y is the fifth column, σy is not specified.

order 0 1 2 3 x0 is the first column in the file, y is the second column, σy is the third column, σx0 is the fourth column and is used in the fit.

order 0 1 2 -1 x0 is the first column in the file, y is the second column, σy is the third column, σx0 is not used.

Examples for two independent variables:

order 2 1 0 3 x0 is the third column in the file, x1 is the second column, y is the first column, σy is the third column.

order 1 4 2 x0 is the second column, x1 is the fifth column, y is the third column, σy is not specified.

order 0 1 2 3 4 5 x0 is the first column in the file, x1 is the second column, y is the third column, σy is the fourth, σx0 is in the fifth column and is used in the fit, σx1 is in the sixth column and is used in the fit.

order 0 1 2 3 -1 -1 x0 is the first column in the file, x1 is the second column, y is the third column, σy is the fourth, σx0 and σx1 are not used in the fit.